package com.example.photo.mapper;

import com.example.photo.model.domain.Prize;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 85792
* @description 针对表【prize(奖项)】的数据库操作Mapper
* @createDate 2023-03-25 19:15:19
* @Entity generator.domain.Prize
*/
public interface PrizeMapper extends BaseMapper<Prize> {

    // 将奖项关联到赛事
    void updateContestId(@Param("prizeIds") List<Integer> prizeIds,
                         @Param("contestId") Integer contestId);

    // 减少奖项剩余名额
    void decrementVacantNum(@Param("prizeId") Integer prizeId);

    // 增加奖项剩余名额
    void incrementVacantNum(@Param("prizeId") Integer prizeId);
}




